<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['finance.management.menu']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
	    <h:outputText value="#{messages['new.payment.label']}" styleClass="sub_header" />
	</h:panelGrid>
	
	<h:panelGrid width="100%" columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80">
		
		<h:panelGroup>
			<h:outputLabel value="#{messages['agreement.no.column']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputText value="#{memberInvListingBean.selectedMember.agreementNo}"></h:outputText>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:outputLabel value="#{messages['membership.no.column']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputText value="#{memberInvListingBean.selectedMember.memberShipNo}"></h:outputText>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:outputLabel value="#{messages['member.name.column']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputText value="#{memberInvListingBean.selectedMember.memberName}"></h:outputText>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:outputLabel value="#{messages['member.status.column']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputText value="#{memberInvListingBean.selectedMember.memberStatus}"></h:outputText>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:outputLabel value="#{messages['member.type.column']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputText value="#{memberInvListingBean.selectedMember.memberType}"></h:outputText>
		</h:panelGroup>	
	</h:panelGrid>
	
	<rich:spacer height="20" />
	
	<rich:dataTable id="data" var="paymentDtl" value="#{memberInvListingBean.paymentList}" rows="20" width="99%" rowKeyVar="row">
		<rich:column style="text-align:center;width:15;" >
			<f:facet name="header">
				<h:outputText value="#{messages['select']}"></h:outputText>
			</f:facet>
			<h:selectBooleanCheckbox value="#{paymentDtl.selected}"></h:selectBooleanCheckbox>
		</rich:column>
		<rich:column style="text-align:left;width:10%;" >
			<f:facet name="header">
				<h:outputText value="#{messages['inv.no.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{paymentDtl.invoiceNo}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;width:30%;" >
			<f:facet name="header">
				<h:outputText value="#{messages['payment.descn.column']}"></h:outputText>
			</f:facet>
			<h:inputText value="#{paymentDtl.paymentDtl.desc}" size="60" maxlength="200"></h:inputText>
		</rich:column>
		<rich:column style="text-align:left;">
			<f:facet name="header">
				<h:outputText value="#{messages['inv.amt.column']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{paymentDtl.invAmt}"></h:outputText>
		</rich:column>
		<rich:column style="text-align:left;">
			<f:facet name="header">
				<h:outputText value="#{messages['current.paid.amt.label']}"></h:outputText>
			</f:facet>
			<h:outputText value="#{paymentDtl.currentPaidAmt}"></h:outputText>
		</rich:column>
	</rich:dataTable>
	
	<rich:spacer height="10" />
	
	<h:panelGrid width="300" columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80">
		<h:panelGroup>
			<h:outputLabel value="#{messages['amount']} :" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<h:inputText value="#{memberInvListingBean.paymentAmt}"></h:inputText>
		</h:panelGroup>
	</h:panelGrid>
	
	<rich:spacer height="10" />
		
	<t:panelGrid columns="3">
   		<h:commandButton value="#{messages['payment.knockoff.button']}" styleClass="button" action="#{memberInvListingBean.createPaymentAction}"></h:commandButton>
   		<h:commandButton value="#{messages['knockoff.from.adv.payment.button']}" styleClass="button" action="#{memberInvListingBean.createAdvancePaymentAction}"></h:commandButton>
	    <h:commandButton value="#{messages['cancel.button']}" styleClass="button" immediate="true" action="#{memberInvListingBean.cancelFromcreatePayment}"></h:commandButton>
    </t:panelGrid>
	
	<rich:spacer height="10" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />
	
	<rich:spacer height="30" />
	
</rich:panel>
